﻿ <?php
    use yii\helpers\html;
use yii\bootstrap\ActiveForm;
  ?>
<!-- main container -->
        <div class="content">
            <div class="container-fluid">
                <div id="pad-wrapper" class="new-user">
                    <div class="row-fluid header">
                        <h3>添加商品</h3></div>
                    <div class="row-fluid form-wrapper">
                        <!-- left column -->
                        <div class="span9 with-sidebar">
                            <div class="container">
                                <form id="w0" class="new_user_form inline-input" action="/index.php?r=admin%2Fproduct%2Fadd" method="post" enctype="multipart/form-data">
								  <?php $form=ActiveForm::begin([
                             'options'=>['class'=>'new_user_form inline-input','id'=>'w0'],
                            'fieldConfig'=>[
                            'template'=>'<div class="span12 field-box">{label}{input} </div>{error}'
                              ]
                              ]);
                             ?>
                                   
                                  <?php  echo $form->field($model,'cateid')->dropDownList($opts);?>
								  
                                    <?php  echo $form->field($model,'title')->textInput(['class'=>'span9 field-box']);?>
                                    <?php  echo $form->field($model,'descr')->textarea(['class'=>'span9 field-box']);?>
                                  <?php  echo $form->field($model,'price')->textInput(['class'=>'span9 field-box']);?>
                                  <?php  echo $form->field($model,'ishot')->textInput(['class'=>'span9 field-box'])->radioList([0=>'不热卖',1=>'热卖']);?>
                                  <?php  echo $form->field($model,'issale')->textInput(['class'=>'span9 field-box'])->radioList([0=>'不促销',1=>'促销']);?>
                                    <?php  echo $form->field($model,'saleprice')->textInput(['class'=>'span9 field-box']);?>
                                    <?php  echo $form->field($model,'num')->textInput(['class'=>'span9 field-box']);?>
                                     <?php  echo $form->field($model,'ison')->textInput(['class'=>'span9 field-box'])->radioList([0=>'下架',1=>'上架']);?>
                                     <?php  echo $form->field($model,'istui')->textInput(['class'=>'span9 field-box'])->radioList([0=>'不推荐',1=>'推荐']);?>
                                     <?php  echo $form->field($model,'cover')->fileInput(['class'=>'span9 field-box']);?>
                                     <?php  echo $form->field($model,'image_list[]')->fileInput(['class'=>'span9 field-box'])->fileInput(['multiple'=>'multiple']);?>
                    
                                  
                                   
                                    <hr>
                                    <input type='button' id="addpic" value='增加一个'>
								 
                                   <div class="span11 field-box actions">
                                          <?php echo Html::submitButton('创建',['class'=>'btn-glow primary']);?>
                                        <span>或者</span>
                                         <?php echo Html::resetButton('取消',['class'=>'reset']);?>
                                         </div>
                                <?php  ActiveForm::end();?>
                            </div>
                        </div>
                        <!-- side right column -->
                        <div class="span3 form-sidebar pull-right">
                            <div class="alert alert-info hidden-tablet">
                                <i class="icon-lightbulb pull-left"></i>请在左侧表单当中填入要添加的商品信息,包括商品名称,描述,图片等</div>
                            <h6>商城用户说明</h6>
                            <p>可以在前台进行购物</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- end main container -->